import {Routes} from 'Shared/utils/routeManager';
import {formatMessage} from './intl';

const routes = new Routes({
    query: {
        url: '/',
        title: formatMessage({
            id: 'routes.query',
            defaultMessage: '查询'
        })
    },
    detail: {
        url: '/:id/detail',
        title: formatMessage({
            id: 'routes.detail',
            defaultMessage: '详情'
        }),
        format: '/{0}/detail'
    },
    deliver: {
        url: '/:id/deliver',
        title: formatMessage({
            id: 'routes.deliver',
            defaultMessage: '交付'
        }),
        format: '/{0}/deliver'
    },
    backOrder: {
        url: '/:id/backOrder',
        title: formatMessage({
            id: 'routes.backOrder',
            defaultMessage: 'backOrder详情'
        }),
        format: '/{0}/backOrder'
    },
    close: {
        url: '/close',
        title: formatMessage({
            id: 'routes.close',
            defaultMessage: '关闭'
        }),
        format: '/{0}/close'
    }
});

export default routes;
